require 'rubygems'
require 'rmagick'

old_images = File.dirname(__FILE__) + '/../images'
new_images = File.dirname(__FILE__) + '/../images2x'
Dir.mkdir(new_images) unless File.exist?(new_images)
Dir.foreach(old_images) do |filename|
  next unless filename =~ /\.(bmp|png)$/i
  image = Magick::ImageList.new "#{old_images}/#{filename}"
  image.resize! image.columns * 2, image.rows * 2, Magick::LanczosFilter, 0.0
  image.write "#{new_images}/#{filename}"
end
